﻿using System;

namespace Alserve.Ffl
{
    public class Security
    {
        public Security()
        {
            
        }

        public static Boolean IsLoggedIn(System.Web.UI.Page webPage)
        {
            Boolean returnValue = false;

            if (webPage.Session["UserID"] != null)
            {
                if (webPage.Session["UserID"].ToString().Length != 0)
                {
                    returnValue = true;
                }
            }
            return returnValue;
        }

        public static Boolean IsAdmin(System.Web.UI.Page webPage)
        {
            Boolean returnValue = false;

            if (webPage.Session["Admin"] != null)
            {
                returnValue = Convert.ToBoolean(webPage.Session["Admin"]);
            }
            return returnValue;
        }


    }
}